from django.urls import re_path
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
# from rest_framework.routers import DefaultRouter
# router = DefaultRouter()
# router.register(r'articles', viewset=views.ArticleViewSet)
urlpatterns = [
    # re_path(r'^articles/$', views.article_list),
    # re_path(r'^articles/(?P<pk>[0-9]+)$', views.article_detail),
    re_path(r'^articles/$', views.ArticleList.as_view()),
    re_path(r'^articles/(?P<pk>[0-9]+)$', views.ArticleDetail.as_view(),name="article-detail"),
    re_path(r'^users/$', views.UserList.as_view()),
    re_path(r'^users/(?P<pk>[0-9]+)$', views.UserDetail.as_view()),
    
    ]

urlpatterns = format_suffix_patterns(urlpatterns)
# urlpatterns += router.urls